using UnityEngine;
using System.Collections;

public class TimeBarScript : HudBaseScript {
	
	public TimeBarScript(): base()
	{
		bar = Resources.Load("HUD/bar") as Texture2D;
		rect = new Rect(0, Screen.height-Screen.height/15.0f, Screen.width, Screen.height/15.0f);
	}
	
	public override bool Operate( Vector3 inPutPosition )
	{
		return false;
	}
	
	public override void Render()
	{
		rect.width = Screen.width * GameMsg.curGameMode.curTime / GameMsg.curGameMode.gameTime; 
		GUI.DrawTexture( rect, bar);
	}
	
	public Texture2D bar;
	public Rect      rect;
}
